package com.twu.biblioteca;

class Book {

    private final String title;

    Book(String title) {
        this.title = title;
    }

    String getTitle() {
        return title;
    }

    @Override
    public int hashCode() {
        return title.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null || (obj instanceof Book == false)) {
            return super.equals(obj);
        }
        Book other = (Book) obj;
        return this.title.equals(other.title);
    }
}
